bitkeeper revision 1.685 (400ed81cDUJ0NzxWWYhOS6J0LBNivg)
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Wed, 21 Jan 2004 19:50:52 +0000 (19:50 +0000)
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Wed, 21 Jan 2004 19:50:52 +0000 (19:50 +0000)
domain.c, dom0_ops.c, xc_linux_save.c:
  A few small fixes.

tools/xc/lib/xc_linux_save.c
xen/common/dom0_ops.c
xen/common/domain.c

index e5f5934cfff306fb976e5269c6f7021ac206260b..42ed198a710c62d77876ac0db61f908085370cd6 100644 (file)
@@ -161,7 +161,12 @@ int xc_linux_save(int xc_handle,
 
         op.cmd = DOM0_STOPDOMAIN;
         op.u.stopdomain.domain = domid;
-        (void)do_dom0_op(xc_handle, &op);
+        if ( do_dom0_op(xc_handle, &op) != 0 )
+        {
+            we_stopped_it = 0;
+            PERROR("Stopping target domain failed");
+            goto out;
+        }
 
         sleep(1);
     }
index d1659276c57c6de1486aa7f22afaf9a5200b25b3..d1a2983ea66bd4899689c39667e7149a6c59e9e9 100644 (file)
@@ -354,6 +354,8 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
 
         if ( likely(get_page(page, p)) )
         {
+            ret = 0;
+
             op.u.getpageframeinfo.type = NONE;
 
             if ( (page->type_and_flags & PGT_count_mask) != 0 )
index 315539e507d292750d98243a76e27cf6341c66fa..8e3338f7b5d425259c6155ceadc631aead043319 100644 (file)
@@ -205,6 +205,9 @@ long stop_other_domain(unsigned int dom)
     unsigned long cpu_mask;
     struct task_struct *p;
     
+    if ( dom == 0 )
+        return -EINVAL;
+
     p = find_domain_by_id (dom);
     if ( p == NULL) return -ESRCH;